//
//  HeaderHomeScreenView.m
//  ZooNgonDoiOS
//
//  Created by Trung sound on 7/9/12.
//  Copyright (c) 2012 Personal. All rights reserved.
//

#import "HeaderHomeScreenView.h"

@implementation HeaderHomeScreenView
#define VIEW_HEADER_HEIGHT 48
#define ITEM_HEADER_WIDTH 80

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        _btnHome = [[UIButton alloc]init];
        _btnTalk = [[UIButton alloc]init];
        _btnMe = [[UIButton alloc]init];
        _btnCheckin = [[UIButton alloc]init];
        
        _btnHome.frame = CGRectMake(0, 0, ITEM_HEADER_WIDTH, VIEW_HEADER_HEIGHT);
        _btnTalk.frame = CGRectMake(ITEM_HEADER_WIDTH, 0, ITEM_HEADER_WIDTH, VIEW_HEADER_HEIGHT);
        _btnMe.frame = CGRectMake(ITEM_HEADER_WIDTH*2, 0, ITEM_HEADER_WIDTH, VIEW_HEADER_HEIGHT);
        _btnCheckin.frame = CGRectMake(ITEM_HEADER_WIDTH*3, 0, ITEM_HEADER_WIDTH, VIEW_HEADER_HEIGHT);
        
        [_btnHome setBackgroundImage:[UIImage imageNamed:IMG_BTN_HOME_NORMAL] forState:UIControlStateNormal];
        [_btnHome setBackgroundImage:[UIImage imageNamed:IMG_BTN_HOME_SELECTED] forState:UIControlEventTouchUpInside];
            //    [_btnHome setShowsTouchWhenHighlighted:YES];
        
        [_btnTalk setBackgroundImage:[UIImage imageNamed:IMG_BTN_TALK_NORMAL] forState:UIControlStateNormal];
        [_btnTalk setBackgroundImage:[UIImage imageNamed:IMG_BTN_TALK_SELECTED] forState:UIControlEventTouchUpInside];
        
        [_btnMe setBackgroundImage:[UIImage imageNamed:IMG_BTN_ME_NORMAL] forState:UIControlStateNormal];
        [_btnMe setBackgroundImage:[UIImage imageNamed:IMG_BTN_ME_SELECTED] forState:UIControlEventTouchUpInside];
        
        [_btnCheckin setBackgroundImage:[UIImage imageNamed:IMG_BTN_CHECKIN_NORMAL] forState:UIControlStateNormal];
        [_btnCheckin setBackgroundImage:[UIImage imageNamed:IMG_BTN_CHECKIN_SELECTED] forState:UIControlEventTouchUpInside];
        
        [self addSubview:_btnHome];
        [self addSubview:_btnTalk];
        [self addSubview:_btnMe];
        [self addSubview:_btnCheckin];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
